/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.modules.enrstu.service;

import me.zhengjie.modules.enrstu.domain.FileInformation;
import me.zhengjie.modules.enrstu.service.dto.FileInformationDto;
import me.zhengjie.modules.enrstu.service.dto.FileInformationQueryCriteria;
import me.zhengjie.modules.enrstu.service.dto.SignUpFileInfoCURDHeaderDto;
import me.zhengjie.utils.PageResult;
import org.springframework.data.domain.Pageable;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
* @website https://eladmin.vip
* @description 附件信息-服务接口
* @author yyx
* @date 2024-11-01
**/
public interface FileInformationService {


    /**
     * 修改填报信息时上传附件
     * @param files /
     * @param fileInfoCreateOrUpdate /
     */
    void fileUploadUpdate(List<MultipartFile> files, SignUpFileInfoCURDHeaderDto fileInfoCreateOrUpdate);

    /**
     * 创建填报信息时上传附件
     * @param files 附件
     * @param likeId 关联id
     * @param gcId 儿童id：用于归纳儿童相关所有附件方便校验
     * @param isChildrenFile 是否儿童相关附件，是->儿童，否->监护人
     */
    void fileUploadCreate(List<MultipartFile> files,String gcId,String likeId,Boolean isChildrenFile);

    /**
     * 根据多个关联id查询附件信息
     * @param linkIds /
     * @return /
     */
    List<FileInformation> fileInfo(List<String> linkIds);

    /**
     * 根据多个关联id查询文件信息
     * @param linkIds/
     * @return /
     */
    byte[] fileDownload(List<String> linkIds);

    /**
     * 下载文件
     * @param LinkId /
     * @param fileAttachmentCode/
     * @return /
     */
    byte[] fileDownload(String LinkId,String fileAttachmentCode);

    /**
     * 删除附件
     * @param signUpFileInfoCURDHeaderDto /
     * @return /
     */
    Boolean fileDelete(SignUpFileInfoCURDHeaderDto signUpFileInfoCURDHeaderDto);

    /**
     * 创建填报信息时上传附件
     * @param gcId 儿童id：用于归纳儿童相关所有附件方便校验

     */
    void submitCheck(String gcId);
}